package com.gxar.timeline.server.base.model;

import com.gxar.common.entity.ResultCode;

/**
 * ResultCodeEnum
 *
 * @author Linsy
 * @version 1.0
 * @created 2023/9/22 11:25 AM
 */
public enum ResultCodeEnum implements ResultCode {

    EXCEL_ERROR(50001, "Excel解析错误"),
    PRICE_ERROR(50002, "价格错误"),
    PRODUCT_EXIST(50003, "产品已存在"),
    COMPANY_NOT_NULL(50004, "公司不能为空"),
    COMPANY_NOT_EXIST_CREATE(50005, "公司/品牌不存在，请先创建"),
    PRICE_UNIT_ERROR(50006, "价格单位错误"),
    PRODUCT_PICTURE_ERROR(50007, "产品照片不能为空"),
    PRODUCT_NOT_EXIST(50008, "产品不存在"),
    COMPANY_NAME_EXIST(50009, "公司名已存在，请更换公司名"),
    ;


    private final Integer code;
    private final String msg;

    ResultCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getRet() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
